package com.baizhi.entity;

import java.util.Date;
import java.util.Objects;

/*员工实体类*/
public class Employee {
    private Integer eid;
    private String empName;
    private Double salary;
    private Date birthday;



    public Integer getEid() {
        return eid;
    }

    public void setEid(Integer eid) {
        this.eid = eid;
    }

    public String getEmpName() {
        return empName;
    }

    public void setEmpName(String empName) {
        this.empName = empName;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Employee() {
    }

    public Employee(Integer eid, String empName, Double salary, Date birthday) {
        this.eid = eid;
        this.empName = empName;
        this.salary = salary;
        this.birthday = birthday;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Employee employee = (Employee) o;
        return Objects.equals(eid, employee.eid) && Objects.equals(empName, employee.empName) && Objects.equals(salary, employee.salary) && Objects.equals(birthday, employee.birthday);
    }

    @Override
    public int hashCode() {
        return Objects.hash(eid, empName, salary, birthday);
    }

    @Override
    public String toString() {
        return "Employee{" +
                "eid=" + eid +
                ", empName='" + empName + '\'' +
                ", salary=" + salary +
                ", birthday=" + birthday +
                '}';
    }
}
